package com.xugongzhang.spring.beans;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @author X
 * @date 2022/12/3 21:59
 */
@Component
public class Cat implements InitializingBean, DisposableBean {

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("Cat创建了...");
    }
    
    @Override
    public void destroy() throws Exception {
        System.out.println("Cat销毁了...");
    }
}
